<?php  
class ControllerNewsList extends Controller {
	public function index() {
	//	$this->language->load('common/footer');
      $this->document->title = 'NYHEDER';
		$itemid = $this->request->get['content_id'];

        $this->load->model('news/news');
        $content = $this->model_news_news->getArticleById($itemid);
        $this->data['name'] = $content['name'];
		$this->data['name'] = $content['name'];
        $this->data['description'] = html_entity_decode($content['description']);
        
		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/news/content.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/news/content.tpl';
		} else {
			$this->template = 'default/template/news/content.tpl';
		}
		
		$this->children = array(
			'common/column_right',
			'common/column_left',
			'common/footer',
			'common/header'
		);
		
		$this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));
	}
	public function welcome() {
	//	$this->language->load('common/footer');
      $this->document->title = 'Velkommen';
		$itemid = $this->request->get['content_id'];

        $this->load->model('news/news');
        $content = $this->model_news_news->getArticleById($itemid);
        $this->data['name'] = $content['name'];
		$this->data['name'] = $content['name'];
        $this->data['description'] = html_entity_decode($content['description']);
        
		if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/news/welcome.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/news/welcome.tpl';
		} else {
			$this->template = 'default/template/news/welcome.tpl';
		}
		
		$this->children = array(
			'common/column_right',
			'common/column_left',
			'common/footer',
			'common/header'
		);
		
		$this->response->setOutput($this->render(TRUE), $this->config->get('config_compression'));
	}
}
?>